//logs.js
const app = getApp()
Page({
  data: {
  	language:'',
  	company:{title:'',logo:'',type:'',address:'',phone:'',website:''} ,
    detailInfo:{} 	
  },
  onLoad: function(value) {
    this.setData({
      language:app.globalData.lang
    });
    var that = this;
    wx.request({
    	url:app.globalData.url+'seller/detail',
    	method:'POST',
    	data:{id:value.id,language:that.data.language},
    	success:function(res){
			that.setData({
        detailInfo: res.data.data
			});
    	}
    });
  },

  callPhone:function(e){
    wx.makePhoneCall({
      phoneNumber:e.currentTarget.dataset.phone
    })
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    var that = this;
    return {
      title: app.globalData.shareTitle,
      path: app.globalData.sharePath,
      imageUrl: '../../../images/share_img.png',
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  },
})